home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 16 / AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso / pd / anwendungen / rtgmaster_dev / includes / asm / rtgmaster / rtgsublibs.i < prev    next >
Text File  |  1998-01-15  |  17KB  |  387 lines

  1. ;
  2. ;     $VER: rtgsublibs.i 1.007 (15 Jan 1998)
  3. ;
  4.  
  5.         IFND    RTGSUBLIBS_I
  6. RTGSUBLIBS_I    SET     1
  7.  
  8.         IFND    UTILITY_TAGITEM_I
  9.         Include "utility/tagitem.i"
  10.         ENDC
  11.  
  12.         IFND    EXEC_TYPES_I
  13.         Include "exec/types.i"
  14.         ENDC
  15.  
  16.         IFND    EXEC_NODES_I
  17.         Include "exec/nodes.i"
  18.         ENDC
  19.  
  20. * The TagItem ID's (ti_Tag values) for OpenRtgScreen()
  21. *
  22. * Information like width, height, screenmode to use, depth and overscan
  23. * information is located in the ScreenReq structure which must be passed
  24. * to OpenRtgScreen().  The RtgScreenModeReq() function creates these
  25. * ScreenReq structures for you.
  26.  
  27. ARGB32 EQU 1
  28. RGB24  EQU 2
  29. RGB16  EQU 4
  30. RGB15  EQU 8
  31. ABGR32 EQU 16
  32. BGR24  EQU 32
  33. BGR16  EQU 64
  34. BGR15  EQU 128
  35. RGBA32 EQU 256
  36. LUT8   EQU 512
  37. GRAFFITI EQU 1024
  38. RGB15PC  EQU 2048
  39. BGR15PC  EQU 4096
  40. RGB16PC  EQU 8192
  41. BGR16PC  EQU 16384
  42. BGRA32   EQU 32768
  43. Planar1  EQU 1
  44. Planar2  EQU 2
  45. Planar3  EQU 4
  46. Planar4  EQU 8
  47. Planar5  EQU 16
  48. Planar6  EQU 32
  49. Planar7  EQU 64
  50. Planar8  EQU 128
  51. Planar1I EQU 65536
  52. Planar2I EQU 131072
  53. Planar3I EQU 262144
  54. Planar4I EQU 524288
  55. Planar5I EQU 1048576
  56. Planar6I EQU 2097152
  57. Planar7I EQU 4194304
  58. Planar8I EQU 8388608
  59. PlanarEHB EQU 32768
  60. PlanarEHBI EQU 2147483648
  61.  
  62.  
  63.     ENUM TAG_USER+1           ;rtg_Tags (OpenRtgScreen)
  64.  
  65.     EITEM rtg_Buffers       ;[1] You can use this tag to specify the number
  66.                             ;of screen buffers for your screen.  Setting this
  67.                             ;to 2 or 3 will allow you to do Double or Triple
  68.                             ;buffering.  Valid values are 1, 2 or 3.
  69.     EITEM rtg_Interleaved   ;[FALSE] Specifying TRUE will cause bitmaps to
  70.                             ;be allocated interleaved.  OpenRtgScreen will
  71.                             ;fail if bitplanes cannot be allocated that way
  72.                             ;unlike Intuition/OpenScreenTagList().
  73.     EITEM rtg_Draggable     ;[TRUE] Specifying FALSE will make the screen
  74.                             ;non-draggable.  Do not use without good reason!
  75.     EITEM rtg_Exclusive     ;[FALSE] Allows screens which won't share the
  76.                             ;display with other screens.  Use sparingly!
  77.  
  78.     EITEM rtg_ChunkySupport ;[0] This LONG is used to indicate which
  79. ;                            ;Chunky modes this application supports.  A
  80. ;                            ;set bit means the mode is supported:
  81. ;    ;     
  82. ;    ;    | Pixels  | Pixel|Color| Pixel 
  83. ;    ; Bit|represent| size |space| layout
  84. ;    ;------------------------------------------------------------------
  85. ;    ;  0  TrueColor  LONG   RGB   %00000000 rrrrrrrr gggggggg bbbbbbbb  ARGB32
  86. ;    ;  1  TrueColor 3 BYTE  RGB   %rrrrrrrr gggggggg bbbbbbbb           RGB24
  87. ;    ;  2  TrueColor  WORD   RGB   %rrrrrggg gggbbbbb                    RGB16
  88. ;    ;  3  TrueColor  WORD   RGB   %0rrrrrgg gggbbbbb                    RGB15
  89. ;    ;  4  TrueColor  LONG   BGR   %00000000 bbbbbbbb gggggggg rrrrrrrr  ABGR32
  90. ;    ;  5  TrueColor 3 BYTE  BGR   %bbbbbbbb gggggggg rrrrrrrr           BGR24
  91. ;    ;  6  TrueColor  WORD   BGR   %bbbbbggg gggrrrrr                    BGR16
  92. ;    ;  7  TrueColor  WORD   BGR   %0bbbbbgg gggrrrrr                    BGR15
  93. ;    ;  8  TrueColor  LONG   RGB   %rrrrrrrr gggggggg bbbbbbbb 00000000  RGBA32
  94. ;    ;  9  ColorMap   BYTE   -     -                                     LUT8
  95. ;    ; 10  Graffiti   BYTE   -     - (Graffiti style chunky, very special)
  96. ;    ; 11  TrueColor  WORD   RGB   %gggbbbbb 0rrrrrgg                    RGB15PC
  97. ;    ; 12  TrueColor  WORD   BGR   %gggrrrrr 0bbbbbgg                    BGR15PC
  98. ;    ; 13  TrueColor  WORD   RGB   %gggbbbbb rrrrrggg                    RGB16PC
  99. ;    ; 14  TrueColor  WORD   BGR   %gggrrrrr bbbbbggg                    BGR16PC
  100. ;    ; 15  TrueColor  LONG   BGR   %bbbbbbbb gggggggg rrrrrrrr 00000000  BGRA32
  101. ;
  102. ;    ; This table is by no means complete.  There are probably more modes
  103. ;    ; available on common Amiga graphic cards, but I have no information
  104. ;    ; on them yet.  If you know about such modes please contact me.
  105. ;
  106. ;    ; Setting this LONG to zero means your application doesn't support
  107. ;    ; any Chunky orientated display modes.
  108. ;
  109.      EITEM rtg_PlanarSupport ;[0] This LONG is used to indicate which
  110. ;                            ;Planar modes this application supports.  A
  111. ;                            ;set bit means the mode is supported:
  112. ;    ; Bit 0: Indicates it supports 1 bitplane non-interleaved
  113. ;    ; Bit 1: Indicates it supports 2 bitplanes non-interleaved
  114. ;    ; (...)
  115. ;    ; Bit 7: Indicates it supports 8 bitplanes non-interleaved
  116. ;
  117. ;    ; Bit 16: Indicates it supports 1 bitplane interleaved
  118. ;    ; Bit 17: Indicates it supports 2 bitplanes interleaved
  119. ;    ; (...)
  120. ;    ; Bit 23: Indicates it supports 8 bitplanes interleaved
  121. ;
  122. ;    ; Bit 15: Indicates it supports EHB mode (6 bitplanes) non-interleaved
  123. ;    ; Bit 31: Indicates it supports EHB mode (6 bitplanes) interleaved
  124. ;
  125. ;    ; Note that all planar modes are color-mapped.  Bits 8-14 and 24-30
  126. ;    ; are unused for now, but could be used later to support planar modes
  127. ;    ; with even higher number of bitplanes.
  128. ;
  129. ;    ; Setting this LONG to zero means your application doesn't support
  130. ;    ; any Planar orientated display modes.
  131.  
  132.  
  133.  
  134.  
  135.      EITEM rtg_ZBuffer
  136.  
  137.      ; Should a Z-Buffer be allocated ? (Only for usage with rtgmaster 3D Extensions)
  138.  
  139.      EITEM rtg_Use3D
  140.  
  141.      ; Use the 3D Chips. (You can only do conventional Double/Triple-Buffering, if you do NOT use
  142.      ; them. If you use them, the Extra Buffers are used by the 3D Chips)
  143.  
  144.      EITEM rtg_Workbench
  145.  
  146.      ; Open a Window on the Workbench, instead of a Screen. This Tag takes the Colorformat
  147.      ; to use with CopyRtgBlit() as Parameter
  148.  
  149.      EITEM rtg_MouseMove
  150.  
  151.      ; RtgGetMsg also returns IDCMP_MOUSEMOVE messages
  152.  
  153.      EITEM rtg_DeltaMove
  154.  
  155.      ; RtgGetMsg also returns IDCMP_MOUSEMOVE messages, and it returns Delta-Values,
  156.      ; not absolute values.
  157.  
  158.      EITEM rtg_PubScreenName
  159.  
  160.      ; Open a Window on a Public Screen with the provided Public Screen Name.
  161.      ; Note: This does not work with all Sublibraries. Some simply ignore this
  162.      ; (For example EGS...)
  163.  
  164.  
  165. *** End of OpenRtgScreenTagList() enumeration ***
  166.  
  167.  
  168. * This structure is private and for the internal use of RtgMaster.library
  169. * and its sub-libraries ONLY.  This structure will change in the future.
  170.  
  171.  STRUCTURE RtgDimensionInfo,0
  172.   ULONG rdi_Width    ; in pixels
  173.   ULONG rdi_Height   ; in pixels
  174.   LABEL rdi_SIZEOF
  175.  
  176. * This structure is private and for the internal use of RtgMaster.library
  177. * and its sub-libraries ONLY.  This structure will change in the future.
  178.   
  179.  STRUCTURE ScreenMode,0
  180.   STRUCT sm_ScrNode,8     ; ln_Succ and ln_Pred from ListNode structure
  181.  
  182.   APTR  sm_Name
  183.   APTR  sm_Description    ; Description of the graphics board this mode
  184.                           ; requires.  For example: "Standard Amiga Chipset".
  185.                           ; Description should not be longer than 31
  186.                           ; characters including terminating NULL-byte.  This
  187.                           ; pointer might be zero so watch out.
  188.   ULONG sm_GraphicsBoard  ; The graphics board this mode requires
  189.   ULONG sm_ModeID         ; ModeID (depends on sm_GraphicsBoard)
  190.   STRUCT sm_Reserved,8    ; 8 bytes reserved space for use of the sub-library
  191.                           ; who creates this ScreenMode structure.  This is
  192.                           ; PRIVATE to the sub-library!
  193.  
  194.   ULONG sm_MinWidth       ; minimum width in pixels
  195.   ULONG sm_MaxWidth       ; maximum width in pixels
  196.   ULONG sm_MinHeight      ; minimum height in pixels
  197.   ULONG sm_MaxHeight      ; maximum height in pixels
  198.  
  199.   STRUCT sm_Default,rdi_SIZEOF  ; Standard width and height of this ScreenMode
  200.   STRUCT sm_TextOverscan,rdi_SIZEOF  ; Settable via preferences
  201.   STRUCT sm_StandardOverscan,rdi_SIZEOF  ; Standard overscan size
  202.   STRUCT sm_MaxOverscan,rdi_SIZEOF  ; Maximum width and height (without the
  203.                                     ; need for AutoScrolling).  Hardware
  204.                                     ; dependant.
  205.  
  206.   ULONG sm_ChunkySupport  ; This LONG is used to indicate which Chunky
  207.                           ; modes this ScreenMode supports.  A set bit
  208.                           ; means the mode is available.  See the
  209.                           ; rtg_ChunkySupport tag for more information.
  210.                           ; Note that the same ScreenMode may never
  211.                           ; use two different layouts (for example BGR
  212.                           ; and RGB)
  213.  
  214.   ULONG sm_PlanarSupport  ; This LONG is used to indicate which Planar
  215.                           ; modes this ScreenMode supports.  A set bit
  216.                           ; means the mode is available.  See the
  217.                           ; rtg_PlanarSupport tag for more information.
  218.                           ; Note that the same ScreenMode may never
  219.                           ; use both interleaved and non-interleaved
  220.                           ; layouts.
  221.  
  222.   ULONG sm_PixelAspect    ; For a PAL 320x256 screen you have to write
  223.                           ; this value here:  sm_PixelAspect =
  224.                           ; (320/4)/(256/3) * 65536
  225.                           ;
  226.                           ; This tells the relation between the height and
  227.                           ; the width of a single pixel on 4:3 screen.  For
  228.                           ; a 640x480 screen this value is 1*65536.
  229.  
  230.   ULONG sm_VertScan       ; Vertical scan rate of this screenmode
  231.                           ; (in Hz)
  232.   ULONG sm_HorScan        ; Horizontal scan rate of this screenmode
  233.                           ; (in Hz)
  234.   ULONG sm_PixelClock     ; Pixelclock rate (in Hz)
  235.   ULONG sm_VertBlank      ; Vertical blank rate of this screenmode
  236.                           ; (in Hz)  (How often the VBlank interupt
  237.                           ; is triggered)
  238.   ULONG sm_Buffers        ; The number of buffers this ScreenMode can
  239.                           ; can handle.  This should always be atleast
  240.                           ; 1, 2 if the Screen can do double-buffering
  241.                           ; and 3 if it can do triple-buffering.
  242.  
  243.   UWORD sm_BitsRed        ; The number of bits per gun for Red
  244.   UWORD sm_BitsGreen      ; The number of bits per gun for Green
  245.   UWORD sm_BitsBlue       ; The number of bits per gun for Blue
  246.  
  247.   LABEL sm_SIZEOF
  248.  
  249. * The TagItem ID's (ti_Tag values) for GetRtgScreenData()
  250. *
  251. * These tags are used to return data to the user about the RtgScreen
  252. * structure in a future compatible way.
  253.  
  254.     ENUM TAG_USER+1
  255.  
  256.     EITEM grd_Width         ;Gets you the Width in pixels of the screen
  257.     EITEM grd_Height        ;Gets you the Height in pixels of the screen
  258.     EITEM grd_PixelLayout   ;Gets you the pixellayout of the screen, see
  259.                             ;defines below.  This also tells you whether
  260.                             ;the screen is Chunky or Planar
  261.     EITEM grd_ColorSpace    ;Gets you the colorspace of the screen, see
  262.                             ;defines below
  263.     EITEM grd_Depth         ;The number of colors LOG 2.  For Planar modes
  264.                             ;this also tells you the number of bitplanes.
  265.                             ;Don't rely on this number except to get the
  266.                             ;number of colors for Chunky modes.
  267.     EITEM grd_PlaneSize     ;Tells you the number of bytes to skip to get
  268.                             ;to the next (bit)plane.  You can use this to
  269.                             ;find the start addresses of the other (bit)planes
  270.                             ;in Planar and in (BytePlane) Chunky modes
  271.     EITEM grd_BytesPerRow   ;The number of bytes taken up by a row.  This
  272.                             ;refers to one (bit/byte)plane only for modes
  273.                             ;working with planes.
  274.     EITEM grd_MouseX        ; The X coordinate of the mouse pointer
  275.     EITEM grd_MouseY        ; The Y coordinate of the mouse pointer
  276.     EITEM grd_BusSystem     ; To which Bussystem is the Board connected ?
  277.     EITEM grd_3DChipset     ; For the use of the 3D Extensions
  278.  
  279. grd_Z3 EQU 1 ; Zorro III
  280. grd_Z2 EQU 2 ; Zorro II
  281. grd_Custom EQU 3 ; Custom Chipset
  282. grd_RGBPort EQU 4 ; connected to RGB Port
  283. grd_GVP EQU 5 ; EGS 110 is connected to "special" bus of GVP Turbo Board
  284. grd_DDirect EQU 6 ; DraCo Direct Bus
  285.  
  286. * defines for grd_PixelLayout
  287.  
  288. grd_PLANAR     EQU 0    ; Non interleaved planar layout [X bitplanes/pixel]
  289. grd_PLANARI    EQU 1    ; Interleaved planar layout     [X bitplanes/pixel] 
  290. grd_CHUNKY     EQU 2    ; 8-bit Chunky layout           [BYTE/pixel]
  291. grd_HICOL15    EQU 3    ; 15-bit Chunky layout          [WORD/pixel]
  292. grd_HICOL16    EQU 4    ; 16-bit Chunky layout          [WORD/pixel]
  293. grd_TRUECOL24  EQU 5    ; 24-bit Chunky layout          [3 BYTES/pixel]
  294. grd_TRUECOL24P EQU 6    ; 24-bit Chunky layout          [3 BYTEPLANES/pixel]
  295. grd_TRUECOL32  EQU 7    ; 24-bit Chunky layout          [LONG/pixel] (RGBx or BGRx)
  296. grd_GRAFFITI   EQU 8    ; 8-bit Graffiti-type Chunky layout (very special...)
  297. grd_TRUECOL32B EQU 9    ; 24-bit Chunky layout          [LONG/pixel] (xRGB or xBGR)
  298.  
  299. * defines for grd_ColorSpace
  300.  
  301. grd_Palette    EQU 0    ; Mode uses a Color Look-Up Table (CLUT)
  302. grd_RGB        EQU 1    ; standard RGB color space
  303. grd_BGR        EQU 2    ; high-endian RGB color space, BGR
  304. grd_RGBPC      EQU 3    ; RGB with lowbyte and highbyte swapped
  305. grd_BGRPC      EQU 4    ; BGR with lowbyte and highbyte swapped
  306.  
  307. *** End of GetRtgScreenData() enumeration ***
  308.  
  309.  
  310. * Information about the RtgScreenModeReq tags:
  311. *
  312. * Each tag specified for the RtgScreenModeReq() function limits in some
  313. * way the number of ScreenModes available to the user.  Sometimes this
  314. * means a screenmode is completely ommited, and sometimes this means
  315. * certain screenmodes can only be used if the user selects them to
  316. * be wide enough.  So for example, a ScreenMode which supports screens
  317. * of 300 to 400 pixels in width, could be filtered out completely by
  318. * setting smr_MinWidth to 401.  But if the smr_MinWidth is set to for
  319. * example 320 then the user is allowed to select a width of 320-400
  320. * pixels (for this ScreenMode, and if the smr_MaxWidth allows this).
  321. * If smr_MinWidth is 200 pixels then the ScreenMode is the limiting
  322. * factor which means the user can't select ScreenModes smaller than
  323. * 300 pixels.
  324. *
  325. * The PlanarSupport and ChunkySupport tags determine which ScreenModes
  326. * are available to the user depending on their layout and number of
  327. * colors.
  328.  
  329. * This structure is private and for the internal use of RtgMaster.library
  330. * and its sub-libraries ONLY.  This structure will change in the future.
  331.  
  332.  STRUCTURE ScreenReq,0
  333.   ULONG sq_ScreenMode ; Ptr to ScreenMode structure
  334.   ULONG sq_Width      ; Must be within Tag specified limits
  335.   ULONG sq_Height     ; The width and height which the user selected
  336.   UWORD sq_Depth      ; Number of colors log2 which the user selected
  337.   UWORD sq_Overscan   ; 0 = No Overscan.  See defines below.
  338.   UBYTE sq_Flags      ; Bit 0 set: EHB selected (sq_Depth = 6)
  339.                       ; Bit 1 set: Chunky mode
  340.                       ; Bit 2 set: Default X gadget selected
  341.                       ; Bit 3 set: Default Y gadget selected
  342.                       ; Bit 4 set: Autoscroll gadget selected
  343.                       ; Bit 5 set: B&W gadget selected
  344.   LABEL sq_SIZEOF
  345.  
  346.  STRUCTURE ScreenReqList,0
  347.   STRUCT srl_SRNode,8
  348.   APTR srl_req
  349.   LABEL srl_SIZEOF
  350.  
  351. * Bits set in sq_Flags
  352.  
  353. sq_EHB          EQU 1 ; EHB selected (sq_Depth = 6)
  354. sq_CHUNKYMODE   EQU 2 ; Chunky Mode selected
  355. sq_DEFAULTX     EQU 4 ; Default Width selected
  356. sq_DEFAULTY     EQU 8 ; Default Height selected
  357.  
  358.  
  359. * defines for sq_Overscan
  360.  
  361. sq_NOOVERSCAN        EQU 0
  362. sq_TEXTOVERSCAN      EQU 1   ; User setable, should be entirely visible
  363. sq_STANDARDOVERSCAN  EQU 2   ; Standard overscan (just past edges)
  364. sq_MAXOVERSCAN       EQU 3   ; Maximum overscan (as much as possible)
  365.  
  366. * This structure is private and for the internal use of RtgMaster.library
  367. * and its sub-libraries ONLY.  This structure will change in the future.
  368.  
  369.  STRUCTURE RtgScreen,0
  370.   ULONG rs_LibBase        ; Sub-library base for this ID
  371.   UWORD rs_LibVersion     ; Sub-library version for this ID
  372.   UWORD rs_Pad1
  373.   ULONG rs_GraphicsBoard  ; ID
  374.   STRUCT rs_Reserved,20
  375.   ULONG rs_MouseX
  376.   ULONG rs_MouseY
  377.   APTR  rs_c2pcode
  378.   APTR rs_c2pdata
  379.   ULONG rs_c2pcurr
  380.   STRUCT rs_c2pname,30
  381.   ; This structure is just a fixed-size header for the real sub library's
  382.   ; and graphics board's specific RtgScreen structure.  These are stored
  383.   ; in the rtgXXXX.i files
  384.   LABEL rs_SIZEOF
  385.  
  386.         ENDC
  387.